package com.dms.common.api;

/**
 * API响应码
 */
public interface ApiResponseCode {
    // HTTP标准状态码
    int SUCCESS = 200;
    int BAD_REQUEST = 400;
    int UNAUTHORIZED = 401;
    int FORBIDDEN = 403;
    int NOT_FOUND = 404;
    int METHOD_NOT_ALLOWED = 405;
    int SYSTEM_ERROR = 500;

    // 业务相关错误码 (1000+)
    int INVALID_PARAMETER = 1001;
    int DATA_NOT_FOUND = 1002;
    int DATA_ALREADY_EXISTS = 1003;
    int OPERATION_FAILED = 1004;

    // 用户相关错误码 (2000+)
    int USER_NOT_FOUND = 2001;
    int USER_ALREADY_EXISTS = 2002;
    int PASSWORD_ERROR = 2003;
    int ACCOUNT_LOCKED = 2004;
    int ACCOUNT_DISABLED = 2005;

    // 商品相关错误码 (3000+)
    int PRODUCT_NOT_FOUND = 3001;
    int PRODUCT_OUT_OF_STOCK = 3002;
    int PRODUCT_ALREADY_EXISTS = 3003;
    int PRODUCT_STATUS_ERROR = 3004;

    // 订单相关错误码 (4000+)
    int ORDER_NOT_FOUND = 4001;
    int ORDER_STATUS_ERROR = 4002;
    int ORDER_CREATE_FAILED = 4003;
    int ORDER_PAY_FAILED = 4004;

    // 系统相关错误码 (5000+)
    int FILE_UPLOAD_FAILED = 5001;
    int FILE_DELETE_FAILED = 5002;
    int FILE_NOT_FOUND = 5003;
    int FILE_TYPE_NOT_ALLOWED = 5004;

    // 业务逻辑错误
    public static final int BUSINESS_FAILED = 422;
} 